package com.dulian.wallet.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dulian.wallet.entity.UserWalletRecord;
import com.dulian.wallet.mapper.UserWalletRecordMapper;
import com.dulian.wallet.service.UserWalletRecordService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserWalletRecordServiceImpl extends ServiceImpl<UserWalletRecordMapper, UserWalletRecord> implements UserWalletRecordService {
    /**
     * 查询用户钱包金额变动明细
     * @param userId
     * @return
     */
    @Override
    public List<UserWalletRecord> getDetails(String userId) {
        return list(Wrappers.lambdaQuery(UserWalletRecord.class).eq(UserWalletRecord::getUserId,userId));
    }
}
